This document provides instructions for downloading and installing R and RStudio on an Apple Macintosh machine.
NOTE: Because of backward dependency issues, some code that we talk about in class will NOT work if you do not download the latest version of R/RStudio. Because the class is pretty large, I will NOT be able to address issues due to older versions in class.
Go to this website.
If your mac is OS X 10.11 and higher (this should be the case for most of you), click the R-3.6.1.pkg
link. If your mac is OS X 10.9 or 10.10, click the R-3.3.3.pkg
link.
After clicking on the link, the file (package installer) will be downloaded onto your computer. Once the file has been downloaded, click on the link and walk through the installation process. Accept the default options for now.
R is now installed on your computer.
The >
character is called the prompt and is the place where we enter commands for the program to interpret. For instance, if you type 25+26
followed by the return/enter key, you will see:
25+26
## [1] 51
q()
and htting the return key.q()
R will ask you if you want to save your work:
Click on “Don’t Save”. You have now left R.
We are not going to use R this way often, as we will use an integrated environment called RStudio.
Go to this website.
Under the “Installers for Supported Platforms” section, click on the “RStudio 1.2.5001 - macOS 10.12+ (64-bit)” link. The file download will begin. (If you are on a 32-bit system or need the 32-bit version of R, you need an older version of RStudio. Go to this website instead.)
Once the file has been downloaded, click on it. A window should pop up:
Click on the RStudio icon and drag it into the Applications folder.
RStudio is now installed on your computer.
Note: For RStudio to work, R needs to be installed first.
Just as in R, the >
character in the Console window is where we enter commands for the program to interpret.
To exit RStudio, click “RStudio” in the menu bar, then click “Quit RStudio”. Alternatively, use the Cmd-Q
shortcut. If prompted to save the workspace, do not save it.